package com.competition.front.service.impl;

import com.competition.front.entity.User;
import com.competition.front.entity.vo.UserRankVo;
import com.competition.front.mapper.UserMapper;
import com.competition.front.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author testjava
 * @since 2021-03-30
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public List<UserRankVo> showRank() {
        List<UserRankVo> userRankVos = baseMapper.selectTopTen();
        return userRankVos;
    }

    @Override
    public List<User> test() {
        List<User> userList = baseMapper.test();
        return userList;
    }
}
